<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<security:authorize ifAllGranted="ROLE_USER">
    
<div id="heading" class="section">
	<h2>Escoge tu discoteca</h2>
</div>

<div class="section">
    
    <form:form modelAttribute="lista" method="post" action="reserva2">
	 <div class="field">
                <div class="label">
                        <label for="searchString">Discotecas:</label>
                </div>
                <div class="input">

                    <form:select  path="codigoDiscoteca.codigo" id="codigo" >
                        <form:option value="">--Seleccionar--</form:option>
                        <form:options items="${discos}" itemLabel="nombre" itemValue="codigo" />
                    </form:select>
                     <script type="text/javascript">
                    Spring.addDecoration(new Spring.ElementDecoration({
                            elementId : "codigo",
                            widgetType : "dijit.form.ComboBox",
                            widgetAttrs : { autocomplete : "false" }}));
                </script>
                </div>
          </div>

          <div class="field">
                <div class="label">
                        <label for="searchString">Fecha:</label>
                </div>
                <div class="input">
                    <form:input path="fecha" id="fecha"/>
                    <script type="text/javascript">
                 Spring.addDecoration(new Spring.ElementDecoration({
                        elementId : "fecha",
                        widgetType : "dijit.form.DateTextBox",
                        widgetAttrs : {
                        datePattern : "dd/MM/yyyy",
                        required : true}}));
                </script>
                </div>
          </div>
        &nbsp;<br/>
        &nbsp;<br/>
	<div class="buttonGroup">
            <input type="submit" name="submitform" value="Siguiente"/>
	</div>
        </form:form>
       
</div>	

</security:authorize>